﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media.Effects;
using System.Windows;
using System.Drawing;

namespace Zero.UControl.Base.Shaders
{
    public class GlowEffect : ShaderEffect
    {
        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(GlowEffect), 0);
        public static readonly DependencyProperty AmountProperty = DependencyProperty.Register("Amount", typeof(double), typeof(GlowEffect), new UIPropertyMetadata(((double)(1D)), PixelShaderConstantCallback(0)));
        public GlowEffect()
        {
            PixelShader pixelShader = new PixelShader();
            pixelShader.UriSource = new Uri("/Zero.UControl.Base;component/Shaders/Script/GlowEffect.ps", UriKind.Relative);
            this.PixelShader = pixelShader;

            this.UpdateShaderValue(InputProperty);
            this.UpdateShaderValue(AmountProperty);
        }
        public Brush Input
        {
            get
            {
                return ((Brush)(this.GetValue(InputProperty)));
            }
            set
            {
                this.SetValue(InputProperty, value);
            }
        }
        /// <summary>ShadowLength.</summary>
        public double Amount
        {
            get
            {
                return ((double)(this.GetValue(AmountProperty)));
            }
            set
            {
                this.SetValue(AmountProperty, value);
            }
        }
    }
}
